import request from "../utils/request";

//发布信息
export function addMessage(data) {
    return request({
        url: '/message/AddMessage',
        method: 'post',
        data
    })
}
//得到五个推荐的信息
export function getFiveMessagesList() {
    return request({
        url: '/message/GetFiveMessagesList',
        method: 'get',
    })
}
//得到所有发布给学生的信息
export function getAllMessagesList() {
    return request({
        url: '/message/GetAllMessagesList',
        method: 'get',
    })
}
//加载信息通过页数和页面大小
export function getMessagesListByPageNumberAndPageSize(pageNumber,pageSize) {
    return request({
        url: '/message/GetMessagesByPageNumberAndPageSize',
        method: 'get',
        params: { pageNumber,pageSize }
    })
}
//查询信息的总条数
export function countTotal() {
    return request({
        url: '/message/CountTotalMessages',
        method: 'get',
    })
}

